﻿using HarmonyLib;
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SuperMe
{
    class SuperMePatch_SkillRecord
    {
        static bool enable_hook = false;

        [HarmonyPatch(typeof(SkillRecord))]
        [HarmonyPatch("get_LearningSaturatedToday")]
        public class Patch_SkillRecord_get_LearningSaturatedToday
        {
            [HarmonyPostfix]
            private static void MyPostfix(SkillRecord __instance, ref bool __result)
            {
                __result = false;
            }
        }

        [HarmonyPatch(typeof(SkillRecord))]
        [HarmonyPatch("LearnRateFactor")]
        [HarmonyPatch(new Type[] { typeof(bool) })]
        public class Patch_SkillRecord_LearnRateFactor
        {
            [HarmonyPostfix]
            private static void MyPostfix(SkillRecord __instance, ref float __result)
            {
                if (enable_hook)
                {
                    __result = __result * 100.0f;
                }
            }
        }
    }
}
